#ifndef F_CASsiUARTDriverE_h
#define F_CASsiUARTDriverE_h


//******************************************************************************
// EDROOM Service Library

#define _EDROOM_IS_DEBUG_

#define _EDROOM_IS_EMBEDDED_

#include "edroomsl.h"

//******************************************************************************
// Data Classes

#include "CDCommConfig.h"
#include "CDSignal.h"
#include "CDFrame.h"
#include "CDTMTCCommServer.h"

//******************************************************************************
// SubComponents


//******************************************************************************
// Component Class   CASsiUARTDriver

class CASsiUARTDriver: public CEDROOMComponent {

public:

	//*********************** Component Signal Enum Type ***********************

	 enum EDROOMCASsiUARTDriverSignal { EDROOMSignalTimeout, EDROOMSignalDestroy, DataReceived, SDataFrame, SSignalFrame };

	//*****************************	SubComponents ******************************



	//***************************** Component Memory ***************************

	class CEDROOMMemory: public CEDROOMComponentMemory{

		private:

			//CQueueHead

			CEDROOMQueue::CQueueHead QueueHeads[EDROOMprioMINIMUM+1];

			public:



		private:



		public:


			// SetMemory
			void SetMemory(TEDROOMUInt32 numMessages_, CEDROOMMessage * MessagesMem_, TEDROOMBool * MessagesMemMarks_, CEDROOMQueue::CQueueNode * QueueNodesMem_, TEDROOMBool * QueueNodesMemMarks_);

	};


	//*****************************	Component Ports ****************************

	CEDROOMInterface	SsiFromComponent;


	// ********************************	Connetions ******************************





	// ******************************** IRQ Handling ****************************

	// IRQ num 12
	static Pr_IRQEvent	EDROOMEventIRQ12;
	static Pr_SemaphoreBin	EDROOMSemEndIRQ12;
	static Pr_IRQHandler_RetType	EDROOMIRQ12Handler(void);
	static void	EDROOMIRQ12AuxHandler(void);
	static Pr_IRQHandler_RetType	EDROOMIRQ12IdleHandler(void);
	static void 	EDROOMIRQ12InterTask(void);
	Pr_Task 	EDROOMIRQ12InterT;
	static CEDROOMIRQInterface	IrqUART;
	static TEDROOMByte	EDROOMVarIRQ12;
	class CEDROOMPOOLIRQ12TEDROOMByte:public CEDROOMProtectedMemoryPool {
	TEDROOMByte mem[10];
	TEDROOMBool marks[10];
		public:
		CEDROOMPOOLIRQ12TEDROOMByte():CEDROOMProtectedMemoryPool(10,mem,marks);
		TEDROOMByte	* AllocData();
	};
	CEDROOMPOOLIRQ12TEDROOMByte	EDROOMPoolIRQ12;




	// ******************************** Constructor ****************************

	CASsiUARTDriver(const char * const roomname,const char * const rooomnameContainer, TEDROOMUInt32 roomNumMaxMens, TEDROOMPriority roomtaskPrio, TEDROOMStackSizeType roomStack, CEDROOMMemory * pActorMemory );




	// *************************************************************************

	// **************************** Public Methods	****************************

	// *************************************************************************



	// **************************** Configuration ******************************

	 int EDROOMConfig();


	// ************************************* Start *****************************

	 int EDROOMStart();




	#ifdef _EDROOM_SYSTEM_CLOSE

	// ***************************** IsComponentFinished ***********************

	TEDROOMBool EDROOMIsComponentFinished();


	#endif

	// *************************************************************************

	// **************************** Protected Methods	************************

	// *************************************************************************

protected:



	// *********************************** Behaviour ***************************

	virtual void EDROOMBehaviour();


	// ************************** Connections Signal Conversion ****************





public:

	// *****************************	Behaviour File *************************

	#include "CASsiUARTDriverC.h"


protected:

	// ********************************  Top State  ****************************

	EDROOMTopState edroomTopState;



};
#endif
